<!DOCTYPE html>
<html>
<head>
    <title>京山市人民医院-OA系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        body, html {
            margin: 0;
            padding: 0;
            font-family: Lato, Helvetica, Arial, sans-serif;
            font-size: 14px;
            line-height: 1.72222;
            color: #34495e;
            background-color: #fff;
            height: 100%;
            width: 100%;
        }

        .shadow {
            position: fixed;
            z-index: 10000;
            width: 200px;
            height: 200px;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            margin: auto;
        }
        .div_cla{
            width: 100%;height: 40px;background: #F0F0F0;line-height: 40px;padding-left: 2%;margin-top: 1%;
        }
    </style>
</head>
<body>
    <div id="wrap" class="wrap" style="height: 100%;width: 100%;">
{#        {% for foo in file_directory %}#}
{#            <div style="">{{ foo }}</div>#}
{#            {% for fo in file_dict.foo %}#}
{#                <div><a href="">{{ fo }}</a></div>#}
{#                {% for i in fo %}#}
{##}
{#                {% endfor %}#}
{#            {% endfor %}#}
{##}
{#        {% endfor %}#}
    </div>

    <!--正在加载-->
    <div id="loading" class="shadow" style="display: none">
        <div style="margin-left: 60px;position: fixed;width:60px;height: 25px;background-size:contain;background: url('../images/jiazai.gif');">
        </div>
    </div>

    <script>
        var file_dict = {{ file_dict | safe }};
        var file_directory = {{ file_directory | safe }};
        var wrap = document.getElementById("wrap");
        for (var i=0; i<file_directory.length; i++) {
            var div = document.createElement("div");
            div.className = "div_cla";div.innerHTML = file_directory[i];
            wrap.appendChild(div);
            for (var j=0; j<file_dict[file_directory[i]].length; j++) {
                var div1 = document.createElement("div");div1.style.paddingLeft="4%";div1.style.marginTop="1%";
                var a_tag = document.createElement("a");
                var file_path = "/static/model_file/"+file_directory[i]+"/"+file_dict[file_directory[i]][j];
                a_tag.innerHTML = file_dict[file_directory[i]][j];a_tag.setAttribute("href", file_path);a_tag.style.textDecoration="none";
                div1.appendChild(a_tag);
                wrap.appendChild(div1);
            }
        }
    </script>
</body>
</html>
